package com.smart.community.region.dto;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 店铺业主DTO
 * 
 * @author Wu.Liang
 * @version 1.0.0
 * @since 2025-01-30
 */
@Data
@Schema(description = "店铺业主DTO")
public class ShopOwnerDTO implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    @Schema(description = "业主ID")
    private Long id;
    
    @NotBlank(message = "业主姓名不能为空")
    @Size(min = 2, max = 50, message = "业主姓名长度必须在2-50个字符之间")
    @Schema(description = "业主姓名", example = "张三")
    private String ownerName;
    
    @NotBlank(message = "联系电话不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "联系电话格式不正确")
    @Schema(description = "联系电话", example = "13800138000")
    private String ownerPhone;
    
    @NotBlank(message = "身份证号不能为空")
    @Pattern(regexp = "^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$", 
             message = "身份证号格式不正确")
    @Schema(description = "身份证号", example = "110101199001011234")
    private String ownerIdCard;
    
    @NotNull(message = "业主类型不能为空")
    @Schema(description = "业主类型：1-个人，2-企业", example = "1")
    private Integer ownerType;
    
    @Size(max = 100, message = "企业名称长度不能超过100个字符")
    @Schema(description = "企业名称", example = "北京科技有限公司")
    private String companyName;
    
    @Size(max = 50, message = "营业执照号长度不能超过50个字符")
    @Schema(description = "营业执照号", example = "91110000123456789X")
    private String companyLicense;
    
    @Size(max = 200, message = "联系地址长度不能超过200个字符")
    @Schema(description = "联系地址", example = "北京市朝阳区xxx街道xxx号")
    private String contactAddress;
    
    @Email(message = "邮箱格式不正确")
    @Size(max = 100, message = "邮箱长度不能超过100个字符")
    @Schema(description = "邮箱", example = "zhangsan@example.com")
    private String email;
    
    @Schema(description = "状态：0-禁用，1-启用", example = "1")
    private Integer status;
    
    @Size(max = 500, message = "备注长度不能超过500个字符")
    @Schema(description = "备注", example = "备注信息")
    private String remark;
    
    @Schema(description = "关联店铺IDs", example = "[1, 2, 3]")
    private java.util.List<Long> shopIds;
}
